]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
modalDialog: constrain container to the size of the stage
authorMaxim Ermilov <zaspire@rambler.ru>
Wed, 16 Mar 2011 22:57:05 +0000 (01:57 +0300)
committerOwen W. Taylor <otaylor@fishsoup.net>
Tue, 22 Mar 2011 01:18:37 +0000 (21:18 -0400)
The lightbox will be sized to the size of its parent container,
so we need to make the parent container reliably the size of the
stage, instead of letting it be auto-sized to the size of its contents.

https://bugzilla.gnome.org/show_bug.cgi?id=644889

js/ui/modalDialog.js

index cba0b725bbc1133f43df48d100dbe69d0e110e62..4b891f5ea549675ab5a6aa89bc6331ced880126e 100644 (file)
@@ -45,6 +45,11 @@ ModalDialog.prototype = {
                                      x: 0,
                                      y: 0 });
         Main.uiGroup.add_actor(this._group);
+
+        let constraint = new Clutter.BindConstraint({ source: global.stage,
+                                                      coordinate: Clutter.BindCoordinate.POSITION | Clutter.BindCoordinate.SIZE });
+        this._group.add_constraint(constraint);
+
         global.focus_manager.add_group(this._group);
         this._initialKeyFocus = this._group;
         this._savedKeyFocus = null;